﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Common;

namespace Library.Entity
{
    public class BookStock : IdCodeName
    {
        public int BookId = 0;
        public decimal BookBalance = 0;

        public BookStock()
        {
        }
        public BookStock(DbDataReader dr)
        {
            Id = DataConversion.ConvertToInt32(dr, "Id");
            Code = DataConversion.ConvertToString(dr, "Code");
            Name = DataConversion.ConvertToString(dr, "Name");
            Remark = DataConversion.ConvertToString(dr, "Remark");
            CreatedDate = DataConversion.ConvertToDateTime(dr, "CreatedDate");
            ModifiedDate = DataConversion.ConvertToDateTime(dr, "ModifiedDate");
            CreatedUserId = DataConversion.ConvertToInt32(dr, "CreatedUserId");
            ModifiedUserId = DataConversion.ConvertToInt32(dr, "ModifiedUserId");
            BookId = DataConversion.ConvertToInt32(dr, "BookId");
            BookBalance = DataConversion.ConvertToDecimal(dr, "BookBalance");
        }
    }
}